package cn.liulingfengyu.structuralpattern.bridgepattern;

public class BridgePatternDemo {
    public static void main(String[] args) {
        // 创建具体实现A
        Implementor implementorA = new ConcreteImplementorA();
        Abstraction abstractionA = new RefinedAbstraction();
        abstractionA.setImplementor(implementorA);
        abstractionA.operation();

        // 创建具体实现B
        Implementor implementorB = new ConcreteImplementorB();
        Abstraction abstractionB = new RefinedAbstraction();
        abstractionB.setImplementor(implementorB);
        abstractionB.operation();
    }
}